package com.authine.cloudpivot.ext.dto.api;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 发货时所需的参数
 *
 * @author 张天赐
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("发货记录")
public class OrderDeliverVO {

    @ApiModelProperty(value = "订单商品ID", required = true, position = 1, example = "123")
    @NotNull(message = "订单商品ID 不能为空")
    private String orderGoodsId;

    @ApiModelProperty(value = "发货数量", required = true, position = 2, example = "2.5")
    @NotNull(message = "发货数量 不能为空")
    @DecimalMin(message = "发货数量必须大于0", value = "0.0000000000000001")
    private BigDecimal num;

    @ApiModelProperty(value = "物流单号", required = true, position = 3, example = "SF668899")
    @NotEmpty(message = "物流单号 不能为空")
    private String waybill;

    @ApiModelProperty(value = "物流公司", required = true, position = 4, example = "顺丰快递")
    @NotEmpty(message = "物流公司 不能为空")
    private String logistics;

    @ApiModelProperty(value = "运费", position = 5, example = "0")
    private BigDecimal freight;

    /**
     * 自送时的预计到货时间
     */
    @ApiModelProperty(value = "预计到货时间", position = 5, example = "2021-07-13 15:00:00")
    private LocalDateTime arrivalTime;
}
